﻿@page "/Accordion"

@using FluentUI.Demo.Shared.Pages.Accordion.Examples

<PageTitle>@App.PageTitle("Accordion")</PageTitle>

<h1>Accordion</h1>

<p>As defined by the <a href="https://www.w3.org/WAI/ARIA/apg/patterns/accordion/" target="_blank" rel="noopener noreferrer">W3C</a>:</p>
<blockquote>
    <p>
        An accordion is a vertically stacked set of interactive headings that each contain a title, content snippet, or thumbnail representing a section of content. The headings function as controls that enable users to reveal or hide their associated sections of content. Accordions are commonly used to reduce the need to scroll when presenting multiple sections of content on a single page.
    </p>
</blockquote>
<p>
    <code>&lt;FluentAccordion&gt;</code> wraps the <code>&lt;fluent-accordion&gt;</code> element, a web component implementation of an accordion leveraging the Fluent UI design system.
    It uses the <code>&lt;FluentAccordionItem&gt;</code> component for defining the individual accordion items
</p>

<h2 id="example">Examples</h2>

<DemoSection Title="Accordion default example" Component="@typeof(AccordionDefault)">
    <Description>Shows simple usage of the accordion component. You can use the 'start' and 'end' slots to pre- or postfix each accordion item with an icon or text</Description>
</DemoSection>

<DemoSection Title="Accordion with single expand mode" Component="@typeof(AccordionSingleExpand)"></DemoSection>

<DemoSection Title="Control from code" Component="@typeof(AccordionControlItem)"></DemoSection>

<h2 id="documentation">Documentation</h2>

<ApiDocumentation Component="typeof(FluentAccordionItem)" />

<ApiDocumentation Component="typeof(FluentAccordion)" />



